import request from '@/utils/request'

// 赠送广告币使用规则详情
export function ruleInfo(params) {
    return request({
        url: '/manager/pay/ruleInfo',
        method: 'get',
        params
    })
}

// 获取广告币详情
export function matrixInfo(params) {
    return request({
        url: '/manager/pay/matrixInfo',
        method: 'get',
        params
    })
}

// 编辑
export function editRule(data) {
    return request({
        url: '/manager/pay/rule',
        method: 'post',
        data
    })
}
// 编辑广告币换算
export function matrix(data) {
    return request({
        url: '/manager/pay/matrix',
        method: 'post',
        data
    })
}


// 套餐列表
export function packageIndex(params) {
    return request({
        url: '/manager/pay/packageIndex',
        method: 'get',
        params
    })
}

// 创建
export function createPackage(data) {
    return request({
        url: '/manager/pay/createPackage',
        method: 'post',
        data
    })
}

// 编辑
export function editPackage(data) {
    return request({
        url: '/manager/pay/editPackage',
        method: 'post',
        data
    })
}

// 删除全部
export function deletePackageAll(data) {
    return request({
        url: '/manager/pay/deletePackageAll',
        method: 'post',
        data
    })
}

// 删除单个
export function deletePackage(data) {
    return request({
        url: '/manager/pay/deletePackage',
        method: 'post',
        data
    })
}

// 开启
export function statusPackageOpen(data) {
    return request({
        url: '/manager/pay/statusPackageOpen',
        method: 'post',
        data
    })
}

// 关闭
export function statusPackageClose(data) {
    return request({
        url: '/manager/pay/statusPackageClose',
        method: 'post',
        data
    })
}

// 创建人
export function getUserList(params) {
    return request({
        url: '/manager/api/getUserList',
        method: 'get',
        params
    })
}

// ------------套餐活动列表-----------------
export function taskIndex(params) {
    return request({
        url: '/manager/pay/taskIndex',
        method: 'get',
        params
    })
}

// 创建
export function createTask(data) {
    return request({
        url: '/manager/pay/createTask',
        method: 'post',
        data
    })
}

// 编辑
export function editTask(data) {
    return request({
        url: '/manager/pay/editTask',
        method: 'post',
        data
    })
}

// 套餐活动状态开启
export function statusTaskOpen(data) {
    return request({
        url: '/manager/pay/statusTaskOpen',
        method: 'post',
        data
    })
}
// 套餐活动状态暂停
export function statusTaskClose(data) {
    return request({
        url: '/manager/pay/statusTaskClose',
        method: 'post',
        data
    })
}
// 删除
export function deleteTaskAll(data) {
    return request({
        url: '/manager/pay/deleteTaskAll',
        method: 'post',
        data
    })
}

// 删除
export function deleteTask(data) {
    return request({
        url: '/manager/pay/deleteTask',
        method: 'post',
        data
    })
}


// 暂停全部
export function statusPackageCloseAll(data) {
    return request({
        url: '/manager/pay/statusPackageCloseAll',
        method: 'post',
        data
    })
}

export function reqPackageIndexExport(data) {
  return request({
    url: '/manager/pay/packageIndexExport',
    method: 'post',
    data: data,
  })
}
export function reqTaskIndexExport(data) {
  return request({
    url: '/manager/pay/taskIndexExport',
    method: 'post',
    data: data,
  })
}
